/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.atp.agencia.frame;

import br.com.atp.agencia.modelo.Aluguel;

/**
 *
 * @author Afonso
 */
public class JButton extends javax.swing.JButton{

    public JButton(Aluguel aluguel, String text) {
        super(text);
        setAluguel(aluguel);
    }

    private Aluguel aluguel;

    public Aluguel getAluguel() {
        return aluguel;
    }
    
    private void setAluguel(Aluguel aluguel) {
        this.aluguel = aluguel;
        setOpaque(aluguel.isOcupado());
    }   
}
